package com.lzs.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lzs.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lzs.util.ActivierUser;
import com.lzs.system.vo.LoginVO;
import com.lzs.util.R;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 管理员表 服务类
 * </p>
 *
 * @author 刘中帅
 * @since 2020-11-24
 */
@Service
public interface UserService extends IService<User> {
     Page<User> selectAllUserPage(Integer page,Integer limit,User user);
     R insertOrUpdateUser(User user);
     R updateStatus(Long userId,String status);
     List<Long> selectRoleByUserId(Long userId); // 根据当前登录Id查找所具有的所有角色Id
     R updateRoleByUserId(Long userId,List<Long> roles);
     ActivierUser selectUserByUserName(LoginVO loginVO);
      String getIpAddr(HttpServletRequest request);
      R findByUserId(Long userId);
      R resetPwd(User user);
}
